1. Field of the Invention
The present invention relates to a texture recording method and a computer readable medium, and in particular to technology for storing a texture image in a memory of a small capacity.
2. Description of the Related Art
Conventionally, texture mapping technology is known as a method for easily creating a realistic solid computer graphic image. The term xe2x80x9ctexturexe2x80x9d here means a design drawn on the surface of a solid. An image processing apparatus employing such technology handles data on the shape of a solid (shape data) and data on the design drawn on the surface of the solid (texture image data) separately. That is, initially, the apparatus temporarily places a solid created based on the shape data in a virtual 3D space in a memory, and then maps a texture image onto the surface of the solid.
A texture image for use in the above texture mapping technology is artificially made by using either computer graphics or a photo image. The thus obtained number of texture images are arranged on a relatively small number of texture recording images, and the texture recording images are compressed before being stored in a disk device, or the like.
To use the texture images for texture mapping, a compressed texture recording image is read from the disk device, and decompressed before being loaded into a memory in an image processing board, so that a necessary texture image is extracted from the texture recording image and mapped to a solid, or a modeling object.
However, the capacity of the memory for the development of a texture recording image is limited in the image processing board. If the texture recording image now loaded into the memory does not contain a texture image desired to be used for mapping, another texture recording image must be loaded by being read from a disk device or the like. In this view, a texture recording image is desired to contain as many texture images as possible in order to increase the speed of image processing using texture mapping.
Also, even when the aforementioned image processing board is not used, storing texture images in a small data amount will save the texture recording image, and increase a data reading speed.
The present invention has been conceived to overcome the above problems and aims to provide a texture recording method for recording a texture image in a smaller data amount, a computer readable medium which records a computer program, and a computer readable medium which records a texture recording image for recording texture images using the texture recording method.
Specifically, the object of the present invention is to provide a texture recording method which makes it possible to record a texture image in a smaller data amount by containing as many texture images as possible in a texture recording image through elimination of wasted space therein, a computer readable medium which records a computer program, and a computer readable medium which records a texture recording image for recording texture images using the texture recording method.
Another object of the present invention is to provide a texture recording method which makes it possible to record a texture image in a smaller data amount by applying a higher compression rate when compressing a texture recording image which contains texture images, while maintaining the quality of the texture image, a computer readable medium which records a computer program, and a computer readable medium which records a texture recording image for recording texture images using the texture recording method.
Still another object of the present invention is to provide a texture recording method which makes it possible to record a texture image in a smaller data amount by reducing a space between texture images (contained in the texture recording image) without enlarging the size of the texture images, a computer readable medium which records a computer program, and a computer readable medium which records a texture recording image for recording texture images using the texture recording method.
In order to achieve the above objects, according to a first aspect of the present invention, there is provided a texture recording method for recording a texture recording image containing images of a number of textures in a memory to thereby record the images of the number of textures in the memory, wherein the images of the number of textures are arranged on the texture recording image based on shape information of each texture such that a region other than a region occupied by the images is reduced on the texture recording image.
In general, when a number of texture images are arranged on a texture recording image to be contained therein, wasted space is inevitably caused between texture images. However, according to this invention, such wasted space can be reduced by utilizing the shape information such as the length of a side of a circumscribed rectangle of each texture, the type of shape of each texture (a triangle, a rectangle and so on), and the length of a side of each texture. As a result, more texture images can be contained in a texture recording image of the same size compared to a conventional design, and texture images can be stored in a smaller data amount.
The above arrangement enables high speed reading of a texture image from texture recording images. Moreover, more texture images can be loaded in a memory in the image processing board dedicated to texture mapping. This also helps increase an image processing speed.
Note that xe2x80x9ca region occupied by the imagesxe2x80x9d may include a necessary margin region.
Further, in the above texture recording method, the shape information of each texture includes information about a shape of a circumscribed rectangle of each texture.
In this invention, information about the shape of a circumscribed rectangle of each texture is used as a part of the shape information. The height and width of a circumscribed rectangle of a texture correspond to the maximum height and width of each texture image, respectively. Therefore, the use of such shape information enables efficient arrangement of a number of texture images on a texture recording image. That is, when the textures are sorted based on the width or height of circumscribed rectangles thereof, the images of the textures which inscribe rectangles of substantially the same height can be arranged side by side on a texture recording image. As a result, texture images can be stored in a smaller data amount.
Still further, in the above texture recording method, each texture is turned over or rotated before the image of each texture is arranged on the texture recording image.
In this invention, a texture is rotated or turned over for reduction of wasted space to achieve efficient arrangement of texture images on the texture recording image. This makes it possible to record texture images in a smaller data amount.
According to a second aspect of the present invention, there is provided a texture recording method for recording a texture recording image containing images of the number of textures in a memory to thereby record the images of the number of textures in the memory, wherein a predetermined texture is transformed into a predetermined shape, and the image of the transformed texture is arranged on the texture recording image.
In this invention, if it is judged for some texture that the image thereof cannot be efficiently arranged on a texture recording image because of its shape, a 2D affin transformation or the like is applied to that texture to transform the texture into such a shape that allows easy and efficient arrangement of the image thereof on the recording image before it is actually arranged. Arranging the image of the thus transformed texture on a texture recording image enables further reduction of wasted space.
Moreover, when a predetermined texture is transformed into a predetermined shape and arranged on a texture recording image based on the shape information of the transformed texture, wasted space can be reduced more efficiently.
Further, in the above texture recording method, when the number of textures includes a triangular texture, the triangular texture is transformed into a right-angled triangle, and the image of the transformed texture having a shape of a right-angled triangle is arranged on the texture recording image.
In this invention, a triangular texture is transformed into a right-angled triangular texture. Since a space is left outside the hypotenuse of the image of a right-angled triangular texture when arranged on a texture recording image, which is sufficient to store a congruous right-angled triangular texture, another triangular texture image can be preferably arranged on the space. This enables more efficient arrangement of texture images on the texture recording image, and helps record texture images in a much smaller data amount.
Still further, in the above texture recording method, when the number of textures includes a quadrangular texture, the quadrangular texture is transformed into a rectangular shape, and the image of the transformed texture having a rectangular shape is arranged on the texture recording image.
In this invention, a quadrangular texture is transformed into a rectangular texture which can be relatively easily arranged on a texture recording image without leaving waste space. This makes it possible to arrange texture images on a texture recording image without causing waste space. Also, when applying a 2D affin transformation or the like to many quadrangular textures, transformation into a rectangular texture, which is the most basic shape, can prevent significant deterioration of image quality.
According to a third aspect of the present invention, there is provided a texture recording method for recording a texture recording image containing images of the number of textures in a memory to thereby record the images of the number of textures in the memory, wherein at least a part of one or more images of the number of textures is arranged overlapping with at least a part of the image of another texture having a larger area.
In this invention, the whole or a part of one texture image is arranged overlapping with at least a part of another texture image. That is, a part of one texture image is also used as the image of another smaller texture. With this arrangement, some texture image is read from a part of a larger texture image arranged on a texture recording image.
This makes it possible to record still more texture images on a texture recording image of the same size compared to a conventional design in which each image occupies a unique region on a texture recording image. In other words, more texture images can be recorded in a much smaller data amount.
According to a fourth aspect of the present invention, there is provided a texture recording method for recording a texture recording image containing images of the number of textures in a memory to thereby record the images of the number of texture in the memory, wherein information is recorded in a region other than a region occupied by the images of the number of textures on the texture recording image, the information being determined based on pixel information of a texture arranged near the region.
Conventionally, since the image on a region surrounding a texture image is discontinuous with the texture image, the spatial frequency tends to be relatively high. In this invention, since such a surrounding region is supplied with pixel based on information regarding the adjacent texture images, spatial correlation can be enhanced in the texture recording image. As a result, when a texture recording image containing a texture image is subjected to image compression including an orthogonal transformation, such as Discrete Cosine Transform (DCT), a higher compression rate can be applied without significant deteriorating the quality of texture images. This makes it possible to record a number of texture images in a much smaller data amount.
According to a fifth aspect of the present invention, there is provided a texture recording method for recording a texture recording image containing an image of a texture which expresses a part of a modeling object in a memory, wherein an image of a region around the part of the modeling object is recorded in a region around the image of the texture on the texture recording image.
Conventionally, when displaying a texture image read from a texture recording image, the displayed image tends to become blurred at the joint with other texture images partly because pixel information about a region surrounding the texture image may also be read by calculation error and displayed.
As a method to avoid the above, each texture image is arranged on a texture recording image, having a slightly larger size than its original texture to comprise more pixels, so that calculation error, if it occurs, will not adversely affect the displayed image. However, this method is problematic in that it increases a data amount for recording a texture image.
According to the present invention, a region around a texture image on a texture recording image is given an image of a region around the part corresponding to the texture image of a modeling object. This arrangement can solve the above problem without significantly increasing a data amount. That is, even if the pixel information about a region around an aimed texture image is read by calculation error and displayed, since the image of the modeling object is also displayed for the mistakenly read region, the entire displayed image does not become significantly blurred. Also, the use of a surrounding region of a texture image to store pixel information will not cause a significant increase in the data amount because the surrounding region is originally used as a margin. With the above arrangement, it is possible to prevent a displayed image from becoming blurred while suppressing a significant increase in the data amount.
In addition to the above method, the present invention also relates to a computer readable medium which stores a program for having a computer use the aforementioned method. The use of such a computer readable medium can achieve similar advantages to those described above.
According to a sixth aspect of the present invention, there is provided a computer readable medium recording a texture recording image containing images of a number of textures, wherein the images of the number of textures are arranged on the texture recording image based on shape information of each texture such that a region other than a region occupied by the images is reduced on the texture recording image.
In general, when a number of texture images are arranged on a texture recording image to be contained therein, waste space is inevitably caused between texture images. However, according to this invention, such waste space can be reduced by utilizing the shape information such as the length of a side of a circumscribed rectangle of each texture, the type of shape of each texture (a triangle, a rectangle and so on), and the length of a side of each texture. As a result, more texture images can be contained in a texture recording image of the same size compared to a conventional design, and texture images can be stored in a smaller data amount.
The above arrangement enables high speed reading of a texture image from texture recording image. Moreover, more texture images can be loaded in a memory in the image processing board dedicated to texture mapping. This also helps increase an image processing speed.
Further, in the above computer readable medium, the shape information of each texture includes information about a length of one side of a circumscribed rectangle of each texture, so that the images of the number of textures are arranged on the texture recording image based on the length of one side of the circumscribed rectangle.
On a texture recording image recorded in a computer readable medium of this invention, texture images are arranged continuous to adjacent ones by utilizing the information about the length of one side of the circumscribed rectangle of each texture. Since the length of a side of a circumscribed rectangle represents a substantial size of a texture, texture images in the substantially same size can be arranged collectively on a texture recording image based on the length of one side of a circumscribed rectangle used as a reference. With the above, more texture images can be recorded in a texture recording image.
Moreover, texture images can be further efficiently arranged on a texture recording image through an arrangement in which a circumscribed rectangle of each texture is defined such that one side thereof contains one side of that texture, and placed such that one side thereof is substantially parallel to that of another texture.
Still further, in the above computer readable medium, the number of textures include triangular textures, and some of them are arranged on the texture recording image such that a vertex thereof having the smallest angle points in a first direction. Moreover, substantially the same number of triangular textures as the above are arranged on the texture recording image such that a vertex thereof having the smallest angle points in a second direction which is substantially opposite to the first direction.
Note that xe2x80x9cdirection which is substantially oppositexe2x80x9d includes xe2x80x9cdirection directly oppositexe2x80x9d, and xe2x80x9csubstantially the same numberxe2x80x9d includes xe2x80x9cthe exact same numberxe2x80x9d. The above makes it possible to arrange more texture images on a texture recording image while effectively utilizing the shape information about the texture images.
According to a seventh aspect of the present invention, there is provided a computer readable medium recording a texture recording image containing images of a number of textures, wherein an image of a texture transformed into a predetermined shape is recorded on the texture recording image.
In this invention, if it is judged for a texture that the image thereof cannot be efficiently arranged on a texture recording image because of its shape, a 2D affin transformation or the like is applied to that texture to transform the texture into a shape that allows easy and efficient arrangement of the image thereof on the recording image before the image thereof is actually arranged. This makes it possible to arrange more texture images on a texture recording image.
According to an eighth aspect of the present invention, there is provided a computer readable medium recording a texture recording image containing images of a number of textures, wherein at least a part of one or more images of the number of textures is arranged overlapping with at least a part of the image of another texture having a larger area.
In this invention, a texture image is read from a part of another larger texture image contained in a texture recording image. This makes it possible to record more texture images in a smaller data amount.
According to a ninth aspect of the present invention, there is provided a computer readable medium recording a texture recording image containing images of a number of textures, wherein information is recorded in a region other than a region occupied by the images of the number of textures on the texture recording image, the information being determined based on pixel information of a texture arranged near the region.
According to the present invention, when a texture recording image containing a texture image is subjected to image compression including an orthogonal transformation, such as Discrete Cosine Transform (DCT), a higher compression rate can be applied without significant deteriorating the quality of texture images. This makes it possible to record a number of texture images in a much smaller data amount.
Note that the term xe2x80x9ca computer readable medium recording a texture recording imagexe2x80x9d used in this specification includes not only a computer readable medium which records a texture recording medium in the form of bit map data but also that which records a texture recording medium subjected to any data transformation, such as compression.
According to a tenth aspect of the present invention, there is provided a computer readable medium recording a texture recording image containing an image of a texture which expresses a part of a modeling object, wherein an image of a region around the part of the modeling object is recorded in a region around the image of the texture on the texture recording image.
According to the present invention, even if the pixel information about a region around an aimed texture image is read by calculation error and displayed, since the image of the modeling object is also displayed for the mistakenly read region, the displayed image does not become significantly blurred. Also, the use of a surrounding region of a texture image to store pixel information will not cause a significant increase of a data amount because the surrounding region is originally used as a margin. With the above arrangement, it is possible to prevent a displayed image from becoming blurred while suppressing a significant increase in the data amount.